import request from '@/utils/request';

export function listForm(params, data) {
  return request({
    url: '/web/flowable/test/page',
    method: 'post',
    params,
    data,
    hmacReq: true,
    encryptReq: true,
    decryptRes: true,
  });
}

export function addListForm(data) {
  return request({
    url: '/web/flowable/test/add',
    method: 'post',
    data,
    hmacReq: true,
    encryptReq: true,
    decryptRes: true,
  });
}

export function submitListForm(data) {
  return request({
    url: '/web/flowable/test/submit',
    method: 'post',
    data,
    hmacReq: true,
    encryptReq: true,
    decryptRes: true,
  });
}

export function editListForm(data) {
  return request({
    url: '/web/flowable/test/edit',
    method: 'post',
    data,
    hmacReq: true,
    encryptReq: true,
    decryptRes: true,
  });
}

export function listFormInfo(id) {
  return request({
    url: '/web/flowable/test/info/' + id,
    method: 'get',
    decryptRes: true,
  });
}

export function deleteListForm(ids) {
  return request({
    url: '/web/flowable/test/delete/' + ids,
    method: 'post',
  });
}

export function initiateProcess(data) {
  return request({
    url: '/web/erp/process/submit',
    method: 'post',
    data,
    hmacReq: true,
    encryptReq: true,
    decryptRes: true,
  });
}
